package autokeyboard.data;

import javax.swing.table.DefaultTableModel;

@SuppressWarnings({ "serial", "rawtypes", "unchecked" })
public class TableModel {
	String[] title = new String[] { "Id#", "Key Stroke Info", "Key Name", "Stroke Delay" };
	public DefaultTableModel setNewModel(Object[][] value) {
		return new DefaultTableModel(value, title ) {

			Class[]		types	= new Class[] { Integer.class, String.class, String.class, Short.class };
			boolean[]	canEdit	= new boolean[] { false, false, false, false };
			
			public Class getColumnClass(int columnIndex) {
				return types[columnIndex];
			}
			public boolean isCellEditable(int rowIndex, int columnIndex) {
				return canEdit[columnIndex];
			}
		};
	}
}
